Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > lazyness
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 53 Topic 2718 of 3037
Post > Topic >>

lazyness

by greg <mail@[EMAIL PROTECTED] > Jan 7, 2008 at 04:57 AM

hello!

i try to get my head around the implications of if a language is lazy
or not.

therefore i constructed a strange "sandwich" function in haskell:

let f x y g = (x+y, g(fst (f x y g)))

f 10 20 (^2)
(30, 900)

in the definition of f x y g the same "f x y g" is "called" again and
still it is solvable for GHCi.
i think this is quite remarkable.

at first only the "fst output" of that function f is evaluated, then a
function g is run over that "first output" and after that the "second
output" of that function is evaluated.

is it true that no strict language will be able to reduce such a
function?

thanks,
sebastian
 




 53 Posts in Topic:
lazyness
greg <mail@[EMAIL PROT  2008-01-07 04:57:43 
Re: lazyness
Ingo Menger <quetzalco  2008-01-07 05:04:56 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-11 00:25:48 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-07 13:49:41 
Re: lazyness
Philippa Cowderoy <fli  2008-01-11 00:59:09 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-13 00:16:00 
Re: lazyness
Ben Franksen <ben.fran  2008-01-14 01:49:27 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 01:05:51 
Re: lazyness
Ben Franksen <ben.fran  2008-01-14 03:21:48 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 01:31:39 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 15:32:55 
Re: lazyness
Ingo Menger <quetzalco  2008-01-11 06:12:24 
Re: lazyness
rossberg@[EMAIL PROTECTED  2008-01-11 07:10:05 
Re: lazyness
Philippa Cowderoy <fli  2008-01-11 20:31:12 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-11 23:16:50 
Re: lazyness
Philippa Cowderoy <fli  2008-01-12 02:47:11 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-12 11:11:17 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 16:40:40 
Re: lazyness
Ingo Menger <quetzalco  2008-01-12 06:37:59 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-12 23:48:49 
Re: lazyness
Philippa Cowderoy <fli  2008-01-14 03:47:43 
Re: lazyness
Joachim Durchholz <jo@  2008-01-14 12:37:10 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 15:29:02 
Re: lazyness
Paul Rubin <http://phr  2008-01-14 08:10:06 
Re: lazyness
Joachim Durchholz <jo@  2008-01-15 15:42:52 
Re: lazyness
Adrian Hey <ahey@[EMAI  2008-01-15 19:18:04 
Re: lazyness
Paul Rubin <http://phr  2008-01-15 11:36:21 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-15 19:30:31 
Re: lazyness
Florian Kreidler <me@[  2008-01-15 16:40:28 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-14 09:10:54 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-15 00:05:26 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 23:58:07 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-15 05:09:25 
Re: lazyness
George Neuner <gneuner  2008-01-15 13:00:52 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-16 00:16:23 
Re: lazyness
George Neuner <gneuner  2008-01-15 21:16:16 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-16 02:49:27 
Re: lazyness
George Neuner <gneuner  2008-01-16 17:36:29 
Re: lazyness
Philippa Cowderoy <fli  2008-01-15 19:14:10 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-15 23:09:56 
Re: lazyness
Joachim Durchholz <jo@  2008-01-16 00:04:57 
Re: lazyness
Paul Rubin <http://phr  2008-01-15 15:22:50 
Re: lazyness
Joachim Durchholz <jo@  2008-01-16 11:40:21 
Re: lazyness
Philippa Cowderoy <fli  2008-01-18 03:38:19 
Re: lazyness
Joachim Durchholz <jo@  2008-01-18 17:11:13 
Re: lazyness
Paul Rubin <http://phr  2008-01-18 09:01:21 
Re: lazyness
Joachim Durchholz <jo@  2008-01-18 20:23:47 
Re: lazyness
Joachim Durchholz <jo@  2008-01-19 22:23:52 
Re: lazyness
Ben Bacarisse <ben.use  2008-01-19 13:02:32 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 16:43:00 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 21:50:48 
Re: lazyness
Joachim Durchholz <jo@  2008-01-19 23:10:39 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 23:01:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 21:09:50 CDT 2008.