I found this in a blog post: > In a `Monad` th...
# arrow
j
I found this in a blog post:
In a 
Monad
 the 
unit
 function takes a pure value, and wraps it in an 
F
 structure 
F[A]
Is this use of the word
pure
related to its use in the term
pure function
? If so, how?
j
Is there some context to this? Is this about arrow? Because our unit function (we generate it with
Functor
afaik) is just
map { Unit }
.
Sometimes we also have a unit value for example on
val IO.unit = IO { Unit }
but I don't think whatever you read refers to either of those ^^
j
@Jannis Sorry, I got the quote from this post https://eli-jordan.github.io/2018/02/16/life-is-a-comonad/.
j
ah
unit
==
return/pure
(haskell) ==
just
(arrow).
j
Yup. I've come across the phrase
pure value
a number of times and I want to know if this use of the term
pure
is related to the (also common) phrase
pure function
.
j
pure value is misleading, there is no such thing as an impure value. functions can be impure, data cannot. Other than that that quote is correct ^^
j
Ah, ok. Thanks!
j
definition of a pure function is: A function that produces no observable effect other than whats indicated in the return value. (or similar 🤷). But how would one define pure value? I can't think of something ^^
j
Yeah, I had similar difficulty. But I blamed it on my being a newbie.