Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Iterating over verbatim hash reference

by rovf (Priest)
on Jan 22, 2010 at 14:02 UTC ( [id://818960]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Iterating over verbatim hash reference
in thread Iterating over verbatim hash reference

more as a (math-like) challange of using functional programming concepts
I see it more like a challenge too. In functional programming, there is usually a concept employed known as Y combinator. The idea is very similar like yours (including the repetition of the code), but once you define this combinator, you can use it for producing anonymous recursive functions at will. In Haskell, for instance, it is builtin and called fix (finding the fixpoint of a recursion).

http://en.wikipedia.org/wiki/Fixed_point_combinator

http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html

Sadly, I don't have any experience with this :-(
-- 
Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://818960]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-16 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found