Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 3325 days ago | link | parent

That version of `atom?` always returns nil, so I'll offer a correction.

Here's a very direct transliteration:

  (= atom?
    (fn (x)
      (and (no (acons x)) (no (no x)))))
The equivalents for `not` and `null?` in Arc are both `no`, because the empty list is the only falsy value. Scheme uses dedicated values for true and false, `t` and `#f`, but Arc uses the symbols `t` and `nil`, and `nil` doubles as the empty list.

Here's a version that uses the utilities Arc provides out of the box:

  (= atom? ~alist)