Jump to content

Scheme Problem

- - - - -

  • Please log in to reply
No replies to this topic

#1
newbie-schemer

newbie-schemer

    Newbie

  • Members
  • Pip
  • 2 posts
Hello! I am having problem using the higher-order function foldl to search for the maximum element in a list.
For a list containing elements as follows, there are no problems using the higher-order functions to find the maximum:

((12) (67) (9))


But I am having problems for lists accompanied by a symbol, as shown below:

((john 23) (paul 87) (tom 76))


How can I make sure that the folding is done only on the cdr of the sublists?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users