ski 2017-03-06 05:51:35
suica : we want to perform both of these two "layers", one right after the other -- hence the `join'
ski 2017-03-06 05:52:22
suica : then the `return' means that the resulting I/O action isn't to be performed immediately, but only when the executer of `once' decides to subsequently execute this computed I/O action
tsmish 2017-03-06 05:52:43
Looks like I misunderstood output, sorry.
chenyu` 2017-03-06 06:30:21
A haskell leetcode
chenyu` 2017-03-06 06:30:23
cool
chetshah_ 2017-03-06 06:32:50
Hello all, haskell beginner here, Just saw this definition of fix in haskell wikibook : fix f = let {x = f x} in x, was wondering if the curly braces have some meaning?
kuribas 2017-03-06 06:33:17
chetshah_: yes, they delimit the substatement.
kuribas 2017-03-06 06:34:02
chetshah_: well, substatements. But alternatively, you can use the layout rule.
kuribas 2017-03-06 06:34:34
chetshah_: what the layout rule does, is just insert curly braces based on indentation.
benzrf 2017-03-06 06:34:56
chetshah_: they are not strictly necessary there; that particular case works without em
chetshah_ 2017-03-06 06:34:58
kuribas you mean escape hatch for layout rules ?
kuribas 2017-03-06 06:35:49
benzrf: because of the layout rule.
geekosaur 2017-03-06 06:36:09
chetshah_, more practically, you need the braces there if you're combining stuff into a single line for ghci (or lambdabot) and the let is inside another layout-inducer like do
geekosaur 2017-03-06 06:36:51
because let can do more than one binding at a time and the language can't tell when the binding list for let ends and the do resumes
kuribas 2017-03-06 06:36:51
chetshah_: the braces are part of the "real" syntax, the layout rule is a convenience.
monochrom 2017-03-06 06:37:35
layout is escape hatch for the {;} rules.
chetshah_ 2017-03-06 06:38:41
Ah.. that makes sense. Thanks all. Was hard to find this on googling though. Guess I would find more under indentation section.