Skip to content

Commit

Permalink
Add max into std
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed May 16, 2024
1 parent 9c5ebb7 commit 609ce75
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
13 changes: 0 additions & 13 deletions max.clinc

This file was deleted.

11 changes: 11 additions & 0 deletions std/max.clinc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(defun max_inner (myless best_so_far mylist)
(if (not mylist) best_so_far
(if (a myless (list best_so_far (f mylist)))
(max_inner myless (f mylist) (r mylist))
(max_inner myless best_so_far (r mylist))
)
)
)
(defun max (myless mylist)
(max_inner myless (f mylist) (r mylist))
)

0 comments on commit 609ce75

Please sign in to comment.