Comment on If you gaze into nil, nil gazes also into youparentComments−klochner15yThanks for the links. Some ruby food for thought . . . > x = nil || 5 #behaviorally equivalent to elvis? > [nil,4,3].compact.map(&:to_s) #null-ignored scope−DanielRibeiro15yYou are welcome. The second line is the essential notion of Maybe monad as a restriction of the Sequence monad (Some of x works like [x] and None works like [], using ruby's [] notation for lists).
Comments
Thanks for the links. Some ruby food for thought . . .
You are welcome. The second line is the essential notion of Maybe monad as a restriction of the Sequence monad (Some of x works like [x] and None works like [], using ruby's [] notation for lists).