13h
comment Most concise way to fold tree structures
... waiting for the J entry ...
13h
comment Most concise way to fold tree structures
nice, except you don't reduce the tree; you calculate the foldr over the singleton tree, which will be the same only if the initial value is the identity value for the g operation (like 1 for (*), but a user could supply 2, and I don't see how you can fit it into your definition). so you'll have to have more clauses probably.
14h
revised Most concise way to fold tree structures
added 125 characters in body
1d
revised Scheme nested lambda function
formatting, tags, spelling
1d
comment Prolog Working Mechanism
@LunaticFnatic you have response(Reply), Reply='y'.. The first asks the user and sets the logical variable Reply; the second checks whether it is 'y' or not.
1d
revised What this functions in Scheme language do?
fix it
2d
comment Concatenate in C, like lists in Haskell
there's no royal road to writing Haskell-to-C translators. You need to really really know C very very well for that. It also requires being extremely comfortable with pointers, coincidentally.
May
21
revised What's the Common Lisp equivalent of the C function fread?
edited tags
May
20
awarded Informed
May
20
comment Sorting a nested List Desceding order
swi-prolog.org/pldoc/man?predicate=sort/2 says "[ISO]".
May
20
answered Can someone explain how this recursion works?
May
20
comment Lists within a list
to ask a new question, please post a new question on SO.
May
20
comment Lists within a list
( made an edit )
May
20
revised Lists within a list
edited body
May
20
revised Lists within a list
added 4 characters in body
May
20
comment Lists within a list
@false I made a mistake? (testing it says OK...?)
May
20
comment Creating a very large list in Scheme
perhaps you should update your answer with some discussion of this, that using map is better.
May
20
revised Finding out nth fibonacci number for very large 'n'
added 224 characters in body
May
20
comment Creating a very large list in Scheme
ideone.com/10YDqG seems to show your approach is faster (probably because map is a built-in).
May
20
comment Creating a very large list in Scheme
yes, but the OP's concern seems to be, will this work with 500,000-long lists without causing problems with memory and stack?
1 2 3 4 5