fixup fold in book club

This commit is contained in:
Sam Caldwell 2019-05-01 10:17:04 -04:00
parent 1b2527920e
commit 63089efdbc
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@
(define (lookup [title : String] (define (lookup [title : String]
[inv : Inventory] -> Int) [inv : Inventory] -> Int)
(for/fold [stock 0] (for/fold ([stock 0])
[item inv] ([item inv])
(if (equal? title (select 0 item)) (if (equal? title (select 0 item))
(select 1 item) (select 1 item)
stock))) stock)))