[Haskell-cafe] Can I destructive rebind a local variable in haskell?
Wang, Chunye (NSN - CN/Beijing)
chunye.wang at nsn.com
Tue Jan 6 02:33:00 EST 2009
Can I destructive rebind a local variable like this
test filename = do
is_dir <- doesDirectoryExist filename
let filename = if not is_dir then filename else filename
putStrLn $ " filename " ++ filename
main = test "."
in GHCi 6.10.1 on WinXP, the ghci aborts silencely when I executes
after compile it into a executable file.
C stack overflow in generated code
I have some code in scheme which works very well
(define (func x)
(let ((x x))
By rebinding a formal variable, we can save naming some varaibles. I
am not good at naming a variable.
Thank you in advance
Chunye Wang <chunye.wang at nsn.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe