Arc Forumnew | comments | leaders | submitlogin
2 points by rocketnia 4858 days ago | link | parent

You're on the right track. ^_^ Like I said, 'delisting just exists to better organize a pattern I use all the time.

A visual example would probably work wonders. Here's the pattern:

  (iflet (<var1> . <rest>) body
    (iflet (<var2> . <rest>) <rest>
      (iflet (<var3> . <rest>) <rest>
        <three-or-more-arg case>
        <two-arg case>)
      <one-arg case>)
    <zero-arg case>)
And here's the same code using (this version of) 'delisting:

  (delisting <rest> body
            <zero-arg case>
    <var1>  <one-arg case>
    <var2>  <two-arg case>
    <var3>  <three-or-more-arg case>)
Any version of 'delisting should have basically the same elements. I'm just not sure where to put them.

Incidentally, halfway through writing that post with 'delisting and 'aif, the 'aif code read (decomposing body ...). XD



1 point by akkartik 4858 days ago | link

Ok, I see the light. That explanation suits me perfectly :)

-----

1 point by rocketnia 4858 days ago | link

I just hope my code doesn't all devolve into "decomposing body" and "ifdecap." >< Talk about anthropomorphizing code.

-----