my question is in reference to this post, specifically:
data Actions a = Actions {
actEval :: a,
actMap :: (a -> a) -> Actions a }
I am confused by the recursive defintion of actMap
function in that it returns a reference to Actions
, recursively, ie what is the base case for recursion, since there's no type specified for a
?
How would Actions
structure be represented in Common Lisp??
EDIT: Also, Actions
constructor takes 2 arguments (as mentioned in the original post). Then what is Actions a
, as returned by the actMap
??