POV-Ray : Newsgroups : povray.off-topic : I found this interesting : Re: I found this interesting Server Time
1 Oct 2024 18:30:17 EDT (-0400)
  Re: I found this interesting  
From: Darren New
Date: 10 Apr 2008 13:37:18
Message: <47fe504e@news.povray.org>
Invisible wrote:
> The "get time" function just returns an I/O command object. You can 
> replace that function call with the command object it returns and the 
> meaning of the program is left completely unchanged. Thus it is 
> referentially transparent.

So if I assign the result of "get time" to a variable and use that 
variable in multiple places, do I get the same time each place I use it, 
or different times?  I think that's what's confusing me.

   S = get_time()
   print(S)
   do_long_task()
   print(S)

I would think you *want* that to do something different from
   print(get_time())
   do_long_task()
   print(get_time())

How would I write each of those in Haskell?


-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.