isovector / reasonablypolymorphic.com

⏳ my math blog
http://reasonablypolymorphic.com
BSD 3-Clause "New" or "Revised" License
23 stars 11 forks source link

blog/review-codata/ #23

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Review: Codata in Action :: Reasonably Polymorphic

https://reasonablypolymorphic.com/blog/review-codata/

armatures commented 2 years ago

I think this is a typo (the second True should be False):

which I might express more naturally in Haskell via:

ifThenElse :: Bool -> a -> a -> a
ifThenElse True t _ = t
ifThenElse True _ f = f

Thanks for the great blog!

isovector commented 2 years ago

Fixed, thanks @armatures!

kitlangton commented 2 years ago

This body is missing its head 😉

Cons head tail cons nil = cons nil (tail cons nil)