# $Id: ary3.pliant,v 1.0 2002/02/08 12:30:00 dada Exp $ # http://dada.perl.it/shootout/ module "/pliant/language/context.pli" gvar Int i gvar Int k gvar Int last gvar Array:Int X gvar Array:Int Y gvar Str s_n := cast ((pliant_script_args translate Address 1) map CStr) Str if (s_n parse (gvar Int n)) last := n - 1 X:size = n Y:size = n for i 0 last X += i + 1 Y += 0 for k 0 999 for i last 0 step -1 Y:i += X:i console Y:0 " " Y:last eol else console "usage: ary3.pliant <number>" eol