Skip to content

Instantly share code, notes, and snippets.

@arcusfelis
Created November 11, 2012 19:16
Show Gist options
  • Select an option

  • Save arcusfelis/4055944 to your computer and use it in GitHub Desktop.

Select an option

Save arcusfelis/4055944 to your computer and use it in GitHub Desktop.
Funs
-module(funs).
-export([f1/0, f2/0]).
id(X) -> X.
id_fn() -> fun id/1.
%% Returns `false'.
f1() ->
id_fn() =:= fun id/1.
%% Returns `true'.
f2() ->
fun id/1 =:= fun id/1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment