View/Edit #29:char_list

Switch to edit mode.

Name(s): char_list
1:  ":char_list(string) => string as a list of characters."
2:  "   e.g., :char_list(\"abad\") => {\"a\",\"b\",\"a\",\"d\"}"
3:  if (30 < (len = length(string = args[1])))
4:    return {@this:char_list(string[1..len / 2]), @this:char_list(string[len / 2 + 1..len])}
5:  else
6:    l = {}
7:    for c in [1..len]
8:      l = {@l, string[c]}
9:    endfor
10:   return l
11: endif

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]