This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tanga:jsx alisdair$ ./rebar compile | |
==> jsx (compile) | |
Compiled src/jsx_to_term.erl | |
Compiled src/jsx_to_json.erl | |
Compiled src/jsx_verify.erl | |
Compiled src/jsx_utils.erl | |
Compiled src/jsx_decoder.erl | |
Compiled src/jsx_decoder.erl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std; | |
import std::io; | |
fn map(list: [str], f: fn(str)) { | |
for name in list { f(name); } | |
} | |
fn main() { | |
let ask_about = fn@(name: str) -> () { alt name { | |
"talentdeficit" { io::print(#fmt("%s is right\n", name)) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case foo() of | |
X when X > 1 -> ...; | |
_ -> ... | |
end. | |
case foo() of | |
X when X > 1 -> ...; | |
_ -> ... | |
end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try foo() | |
catch | |
error:_ -> ...; | |
throw:_ -> ... | |
end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some_random_function | |
(X) when X > 1 -> ...; | |
(X) -> ...; | |
(X, Y) when X > 1 -> ...; | |
(X, Y) -> ... | |
end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: #<NativeException: org.virtualbox_4_1.VBoxException: The function "powerDown" returned an error condition: "Invalid machine state: RestoringSnapshot (must be Running, Paused or Stuck)" (0x80bb0002)> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handle_cast(Msg, State) -> | |
some_logging_function(Msg, State), | |
erlang:error(function_clause). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -noshell | |
main(_) -> | |
error_logger:tty(false), | |
user_drv:start(), | |
shell:server(false, false). | |
Erlang R16B (erts-5.10.1) [source] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -nouser | |
main(_) -> | |
error_logger:tty(false), | |
user_drv:start(), | |
shell:server(false, false). | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(4)> f = fn | |
...(4)> nil -> :null | |
...(4)> x -> x | |
...(4)> end | |
#Function<erl_eval.6.17052888> | |
iex(5)> JSEX.Customize.defdecoder(MyDecoder, f) | |
iex:5: redefining module MyDecoder | |
** (CompileError) iex:5: function f/0 undefined | |