Arc Forumnew | comments | leaders | submitlogin
1 point by jsgrahamus 4573 days ago | link | parent

  Jarc> (map 'getTime (list (new java.util.Date))).
  (stdin):2: Error: Can't apply function: getTime

  0:      (map (quote getTime) (list (new java.util.Date)))
  DEBUG 0: Unknown command: .
  0:      (map (quote getTime) (list (new java.util.Date)))
  DEBUG 0: r 13
  13

  ---

  Jarc> (map 'getTime (list (new java.util.Date)))
  (stdin):4: Error: Can't apply function: getTime

  0:      (map (quote getTime) (list (new java.util.Date)))
  DEBUG 0: r 13
  13

  ---

  Jarc> (map 'getTime (new java.util.Date))
  (stdin):6: Error: Type-error:
  Tue May 15 12:02:40 MDT 2012 is not of type LIST

  0:      (map (quote getTime) (new java.util.Date))
  DEBUG 0: r 13
  13

  ---

  Jarc>


1 point by rocketnia 4573 days ago | link

First error: You included a spurious . at the end. (You caught this.)

Third error: The sequence you passed to 'map was a java.util.Date, not a string or list like 'map expects.

Second error: Now that seems weird.

I can't help much at this time of day, but what happens when you say "(getTime:new java.util.Date)" and "(idfn!getTime:new java.util.Date)"?

-----

1 point by jsgrahamus 4573 days ago | link

  Jarc> (getTime:new java.util.Date)
  1337107797339

  Jarc> (idfn!getTime:new java.util.Date)
  1337107814529

  Jarc>
Thanks.

-----

1 point by rocketnia 4573 days ago | link

Oh, now that we're talking about it, I seem to remember there's some kind of issue where Jarc allows regular function calls on symbols but 'apply on a symbol doesn't work. So how about (apply 'getTime (list:new java.util.Date))?

-----

1 point by jsgrahamus 4573 days ago | link

  Jarc> (apply 'getTime (list:new java.util.Date))
  1337113306091
  Jarc>

-----