notes

Personal notes
git clone git://git.laack.co/notes.git
Log | Files | Refs

PartiallyApplied.md (460B)


      1 # Partially Applied (Haskell)
      2 
      3 **Source:** Effective Haskell
      4 
      5 **Chapter:** 1
      6 
      7 **Definition:** Partially applied functions are ones where not all input parameters have been passed. 
      8 
      9 ## Example
     10 
     11 ```haskell
     12 module Main where
     13 
     14 greet message person = print (message <> " " <> person)
     15 
     16 greeting = greet "Hello"
     17 
     18 main = greeting "Andrew"
     19 ```
     20 
     21 In this example, we call the function greet with one input and later pass the second input to fully saturate the function.