A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Need help with basics of ML
Joined: Nov 03, 2013
Nov 03, 2013 18:43:33
I need to first generate an infinite list containing fibonacci sequence.
This is what i did.
-datatype 'a inflist = NIL |CONS of 'a * (unit -> 'a inflist); -fun fib a b=CONS(a, fn() => fib b (a+b)); val fib=fn : int-> int -> int inflist
Now i need to create an infinite list that has the entire fibonacci sequence.
And i am not able to understand how to do that.
It is sorta covered in the
JavaRanch Style Guide
subject: Need help with basics of ML
What does recursion code hurt ?
Online Java Editor/Compiler?
Java Assignment Problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014