1234567891011121314151617 |
- type Point {
- x: Float,
- y: Float
- };
- do
- let l := [{ |Point| { x:1, y: 2 } }, { |Point| { x:3, y: 4 } }],
- let p := { |.y| { |Point| { x: 0, y: -1 } } },
- let q := l.{ map |.x| }.{ map || },
- let str := [
- p.{String},
- q.{ map |.{String}| }.{ join ', ' }
- ].{ join \n },
- { os::println str }
- . { crash-on-error };
|