Skip to content

Instantly share code, notes, and snippets.

@solidnerd
Created July 20, 2015 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solidnerd/8181ffffbb30a52a2494 to your computer and use it in GitHub Desktop.
Save solidnerd/8181ffffbb30a52a2494 to your computer and use it in GitHub Desktop.
Fun Inception !
Fruit = [apple,pear,orange] .
MakeTest = fun(L) -> (fun(X) -> lists:member(X, L) end) end.
IsFruit = MakeTest(Fruit).
IsFruit(pear).
% result: true
IsFruit(apple).
% result: true
IsFruit(dog).
% result: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment