aboutsummaryrefslogtreecommitdiff
path: root/examples/23-function-expression/src/HelloWorld.shed
blob: 1ebb2863fff2c50f70a3082d4b51ec265d362be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
fun printer(left: String) -> fn (String) ! Io -> Unit {
    fn (right: String) !Io -> Unit {
        print!(left);
        print!(right);
    }
}

pub fun main() ! Io -> Unit {
    printer("hello")!(", ");
    printer("world")!("\n");
}