
1 Nov
2008
1 Nov
'08
7:43 p.m.
On Sat, Nov 01, 2008 at 11:23:38AM -0500, Larry Evans wrote:
put (n+1) AFAICT, with the preceding |n <- get|, this means:
put (get+1) and since the get has type, |State Int Int|, and there's not + operator defined on that type (because the following:
Others have explained in more detail, let me just state this simply to hopefully clear up the main point of confusion: let x = y and x <- y are *not* the same. In the first case, x is just a name for y, and x and y can be used interchangeably. In the second case, x is bound to *the result of* the action y. So x and y cannot be used interchangeably. -Brent