Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

ap

Published by victorquete, 2016-09-26 21:51:44

Description: ap

Search

Read the Text Version

Universidade Cruzeiro do SulVictor Hugo Torquete RGM 125200-3Resolução atividade de Aprofundamento Unidade IVSão Paulo2016

Scheme:(define maximo (lambda (ls) (let ( (head (car ls)) (tail (cdr ls))) (if (null? tail) head (let ((maximo-tail (maximo tail))) (if (> head maximo-tail) head maximo-tail ) ) ) ) ))(maximo '(1 5 4 3))PROLOG:maxlist([A],A).maxlist([A|LIST],MAX):- maxlist(LIST,MAX0),(A>=MAX0, MAX=A ; A<MAX0,MAX=MAX0).


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook