The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Lift into a Pointed Functor with of

Lift into a Pointed Functor with of

1:21
We examine the `of` function we've seen on a few types and discover it's the Pointed interface.
Watch this lesson now
Avatar
egghead.io

We examine the of function we've seen on a few types and discover it's the Pointed interface.

Avatar
Nik

Would anyone be kind enough to explain to me the difference between making a Box with Box(3) in the first episode and with of as in Box.of(3) in this ep?

In reply to egghead.io
Avatar
Brian Lonsdorf

Hi Nik!

The idea is that of is a generic way to place a value into a Functor. So those two are exactly equivalent when it comes to Box, but for more complex constructors like new Task((rej, res)... it gives us an interface to program against that's "constructor agnostic".

In reply to Nik
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?