in reply to Re: Currying--useful examples?
in thread Currying--useful examples?
But this is straying off-topic for this site...angle :: String -> String angle s = surround "<" ">" s {- This can, in "points free" style, be written: angle = surround "<" ">" -- look ma, no explicit variable! -} surround :: String -> String -> String -> String surround start end text = start ++ text ++ end -- The idea is to reuse surround: quote = surround "'" "'" bracket = surround "[" "]" braces = surround "{" "}" ... etc.
|
|---|