about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_when_string_debug.txt
blob: 247d3c012eba6206272c89746b90fb583e8a7ee8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
getFunction : type -> 
  when type is
    "double" then @double
    "square" then @square
    _        then @add1;

double : x -> x * 2;
square : x -> x * x;
add1 : x -> x + 1;

result : getFunction "double";
..out result;