home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,951 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,320 of 117,951   
   Paul Rubin to Anton Ertl   
   Re: Closures   
   18 Mar 24 16:56:44   
   
   From: no.email@nospam.invalid   
      
   anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:   
   > The lazy evaluation of Haskell is certainly not equivalent to   
   > call-by-name, because you cannot implement Jensen's device with it.   
      
   Jensen's device depends on having mutable variables.  If they are not   
   allowed, Haskell's evaluation is equivalent to call-by-name.   
      
   >  does   
   > something with monads that I don't understand   
      
   It creates a mutable memory cell (STRef) that is read and written as if   
   it's an i/o device (readSTRef/writeSTRef).  Then it makes a closure that   
   reads from the cell and returns the reciprocal of the contents, and   
   sums over the result of that closure when it writes k=1,2...n into the   
   cell.  Ugh!!!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca