X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment3.mdwn;h=72c6f28dd220375d8f00bf1ddab7bc209b4e0ed5;hp=8ea5777cc8bed5edca2207d18e04cab24e5368fd;hb=198c5165ec8ea98d439a9fcc421d97dba44261af;hpb=e2b0f58ce66d62a6d8f44c72fcbde57407c569a9;ds=sidebyside diff --git a/assignment3.mdwn b/assignment3.mdwn index 8ea5777c..72c6f28d 100644 --- a/assignment3.mdwn +++ b/assignment3.mdwn @@ -51,19 +51,14 @@ Then `length mylist` evaluates to 3. function, write a function that computes factorials. (Recall that n!, the factorial of n, is n times the factorial of n-1.) -Warning: my browser isn't able to compute factorials of numbers -greater than 2 (it does't provide enough resources for the JavaScript -interpreter; web pages are not supposed to be that computationally -intensive). +Warning: it takes a long time for my browser to compute factorials larger than 4! -3. (Easy) Write a function `listLenEq` that returns true just in case -two lists have the -same length. That is, +3. (Easy) Write a function `equal_length` that returns true just in case +two lists have the same length. That is, - listLenEq mylist (make_list junk (make_list junk (make_list junk empty))) - ~~> true + equal_length mylist (make_list junk (make_list junk (make_list junk empty))) ~~> true - listLenEq mylist (make_list junk (make_list junk empty))) ~~> false + equal_length mylist (make_list junk (make_list junk empty))) ~~> false 4. (Still easy) Now write the same function, but don't use the length