> Nice. Good solution. ``imperative style'' is not a bad idea when I'm
> not used to the ``pure functional style''
> filename <- return $ combine filename "Makefile"
> Similar to the other imperative language
> filename = joinPath(filename,"Makefile")
I wouldn't consider it particularly imperative, it's just variable
shadowing. It desugars to calling a function with a parameter that
shadows the old variable.
Of course, you could say a more functional way would be to use
pointfree style or just nested calls to avoid naming the intermediate
values. Then you can't intersperse IO actions... but it's good to
avoid doing that anyway.
Haskell-Cafe mailing list