Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Functions that churn out lambdas - when?

Name: Anonymous 2009-09-12 1:29

I just wrote my own "repeated" implementation (SICP lecture 3x), and I thought the same could have been done with something of the format (repeated procedure item times), instead of dealing with another layer of abstraction by churning out a procedure that does the actual iteration ((repeated procedure times) item). At this point, choosing between both forms seems like an arbitrary flip of the coin - can anyone on /prog/ enlighten me?

Name: Anonymous 2009-09-12 1:52


(define (repeated' procedure item times)
  ((repeated procedure times) item))


But you have no idea how to order arguments, and I suggest:

(((repeated times) procedure) item)

Since scheme doesn't automatically curry :(

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List