Arc Forumnew | comments | leaders | submitlogin
Is flat with stringstoo broken?
5 points by kens 6148 days ago | 2 comments
I can't figure out how the flat function is supposed to work with stringstoo set:

  arc> (flat '(1 2 "abc") 'stringstoo)
  Error: "Can't take car of \"abc\""
So am I missing something about the behavior of flat? (Without stringstoo, it flattens a list and removes nil elements, which makes sense. Looking at the code it seems that with stringstoo, it was written with the expectation that car and cdr work on strings.)

(Of course, "broken" is the wrong word since the code is the spec. I guess I should say: "Does the spec for flat with stringstoo specify behavior that isn't optimal?" :-)



2 points by pg 6147 days ago | link

Looks like a bug; will fix.

-----

1 point by cooldude127 6148 days ago | link

what is this ideally supposed to return? (1 2 #\a #\b #\c) ?

-----