# $Id: hash.pliant,v 1.0 2002/02/06 16:48:00 dada Exp $ # http://dada.perl.it/shootout/ module "/pliant/language/context.pli" gvar (Dictionary Str Int) X gvar Int c gvar Int i gvar Str s_n := cast ((pliant_script_args translate Address 1) map CStr) Str if (s_n parse (gvar Int n)) c := 0 for (i) 1 n X insert (string i "radix 16") i for (i) n 1 step -1 if (X exists (string i)) c := c + 1 console c eol else console "usage: nestedloop.pli <number>" eol