 
      
    | You are here | blog.ploeh.dk | ||
| | | | | ashishvegaraju.com | |
| | | | | In my last article about Functional domain modeling, I explored the expressiveness of F# in modeling a domain. I fell in love with the simplicity and expressiveness of the language. In this article I will attempt to explore function purity in F#. In F#, functions are first class citizens because it allows to pass function as an argument to other function, return a function or assign function to a variable. Initially I found it a bit hard to wrap my head around the concept of treating functions as first class citizens. In fact one of the biggest challenge for me was surprisingly not the weird syntax of F#, but to think in terms of functions. | |
| | | | | pbrisbin.com | |
| | | | | In Haskell, functions must always return the same consistent type. There is also no concept of nil or null built into the language. This is not meant to handicap you, and the expressiveness and polymorphic-ness of Haskell's types mean it certainly does not. One way to handle such situations where functions (conceptually) may or may not return a value is through the Maybe type. data Maybe a = Just a | Nothing Maybe is a perfect and simple solution for this situation. | |
| | | | | argumatronic.com | |
| | | | | Occasional writings about Haskell. | |
| | | | | gelisam.blogspot.com | |
| | | Day 5: infix notation and list comprehensions This puzzle lists a bunch of nonsense conditions on the characters of a string, and we must c... | ||