Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Loop question

32 views
Skip to first unread message

radhakris...@gmail.com

unread,
Mar 14, 2017, 3:07:37 AM3/14/17
to

Hi,
Unable to use IRC behind corporate proxy. So I am posting it here.
I am converting to Haskell.

(defun run ()
(loop repeat 40 do (print (/ (loop repeat 100 sum (game t))
100.0))))

I have the 'game' function which takes an optional parameter.So here the sum of 100 return values from 'game' is divided by 100.0.

40 such values are printed. Is that right ?

What does 't' mean in game t ?

Thanks,
Mohan

Barry Margolin

unread,
Mar 14, 2017, 1:57:27 PM3/14/17
to
In article <00fa04d2-dcce-4e91...@googlegroups.com>,
It's the value of the optional parameter to the GAME function. T in Lisp
is a constant whose value is the symbol T -- it's conventionally used as
the default truthy value.

You'd have to look at the GAME function to see how it uses this value.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0 new messages