- 952 名前:デフォルトの名無しさん mailto:sage [2019/05/17(金) 00:26:31.35 ID:SI3/qEwo.net]
- >>893 Pharo/Squeak Smalltalk
| fn | fn := [:arr | String streamContents: [:ss | | cIdx lIdx | cIdx := lIdx := 0. arr do: [:spec | spec third > lIdx ifTrue: [ ss nextPutAll: (String new: spec third - lIdx withAll: Character cr). lIdx := spec third. cIdx := 0 ]. ss nextPutAll: (String new: spec second - cIdx withAll: Character space). ss nextPutAll: spec first. cIdx := spec second + 1. ] ] ]. fn value: #( (a 0 0) (b 2 0) (c 4 0) (d 0 2)). "=> a b c d "
|

|