Arc Forumnew | comments | leaders | submitlogin
2 points by kens1 6130 days ago | link | parent

A couple more broken things. trim seems to be broken with 'front:

  arc> (trim "abc" 'front)
  Error: "<: expected argument of type <real number>; given nil"
num doesn't work well with negative numbers:

  arc> (num -123456)
  "-,123,456"
I also don't get why there are both findsubseq and posmatch functions, since findsubseq seems to be a less-functional version of posmatch. findsubseq doesn't support a function as pattern, but posmatch does. On the other hand, findsubseq actually works.)

  arc> (findsubseq "an" "banana" 2)
  3
  arc> (posmatch "an" "banana" 2)
  3
  arc> (findsubseq "an" "foo")
  nil
  arc> (posmatch "an" "foo")
  Error: "string-ref: index 3 out of range [0, 2] for string: \"foo\""