Search Results

Showing results 1 to 9 of 9
Search took 0.01 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: Legacy and Other Languages and child forums
Forum: Legacy and Other Languages Mar 4th, 2009
Replies: 5
Views: 1,429
Posted By Rashakil Fol
All you need to do to fix your problem is look at your code and imagine what a prolog interpreter would do when interpreting it.
Forum: Legacy and Other Languages Mar 3rd, 2009
Replies: 5
Views: 1,429
Posted By Rashakil Fol
Well you have more problems than just that.
Forum: Legacy and Other Languages Mar 2nd, 2009
Replies: 5
Views: 1,429
Posted By Rashakil Fol
Your second predicate is going to match and override whatever you do in your third predicate. You need to handle nested lists before you handle non-nested lists.
Forum: Legacy and Other Languages Feb 3rd, 2009
Replies: 4
Views: 839
Posted By Rashakil Fol
No, it says you have non-exhaustive patterns!

In particular, you defined the function binadd for non-empty lists with:

binadd (x:xs) (y:ys) n = ...


But you didn't define the function for...
Forum: Legacy and Other Languages Feb 2nd, 2009
Replies: 4
Views: 839
Posted By Rashakil Fol
d2b2 evaluates to something of type [Int], right? Which means the expression (d2b2(n / 2):1) is trying to pass an [Int] as the left-hand argument of the (:) function. Since the (:) function is of...
Forum: Legacy and Other Languages Dec 19th, 2008
Replies: 2
Views: 873
Posted By Rashakil Fol
This is a complete waste of your time.
Forum: Legacy and Other Languages Nov 15th, 2008
Replies: 2
Views: 973
Posted By Rashakil Fol
awk '{ system("kill " $2) }'
Forum: Legacy and Other Languages Nov 26th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,077
Posted By Rashakil Fol
Well, yeah. I agree with calling functions (when used functionally in Scheme) functions. And calling procedures (when used procedurally, with side effects) procedures.

Of course, Scheme isn't...
Forum: Legacy and Other Languages Nov 24th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,077
Posted By Rashakil Fol
There are no functions in Scheme, only procedures. That is, the word used in the R5RS specification (and probably R6RS, but I haven't read that) is "procedure". That's why there is a procedure...
Showing results 1 to 9 of 9

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC