Skip to content

Instantly share code, notes, and snippets.

@voluntas
Created July 24, 2011 09:37
Show Gist options
  • Save voluntas/1102447 to your computer and use it in GitHub Desktop.
Save voluntas/1102447 to your computer and use it in GitHub Desktop.
関数のシリアライズ
Eshell V5.8.4 (abort with ^G)
1> F = fun() -> ok end.
#Fun<erl_eval.20.21881191>
2> erlang:term_to_binary(F).
<<131,112,0,0,2,139,0,251,3,184,152,93,16,176,57,2,110,24,
202,39,247,72,160,0,0,0,1,0,0,...>>
3> erlang:binary_to_term(erlang:term_to_binary(F)).
#Fun<erl_eval.20.21881191>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment