Skip to content

Instantly share code, notes, and snippets.

@dungwinux
Created March 2, 2021 21:09
Show Gist options
  • Save dungwinux/c6a750e78c820717b9488ea4fbd896db to your computer and use it in GitHub Desktop.
Save dungwinux/c6a750e78c820717b9488ea4fbd896db to your computer and use it in GitHub Desktop.
Functional with Haskell
h f g x = f (f g) (g x) -- JS equivalent: let h = f => g => x => f(f(g))(g(x))
a y x = y x + 1
b x = x * 2
h a b 1 -- Guess the value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment