Arc Forumnew | comments | leaders | submitlogin
3 points by ndanger 6139 days ago | link | parent

Strings aren't just lists of characters:

    arc> (map [coerce _ 'int] '(#\f #\o #\o))
    (102 111 111)
    arc> (map [coerce _ 'int] (coerce "foo" 'cons))
    (102 111 111)
    arc> (map [coerce _ 'char] '(102 111 111))
    (#\f #\o #\o)
    arc> (string (map [coerce _ 'char] '(102 111 111)))
    "foo"
To unify strings and lists of chars I think you'd need a way to specify encodings (well, once Arc is worried about that sort of thing).