Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
fp2023:lab05 [2023/03/31 11:40] pdmatei |
fp2023:lab05 [2023/03/31 12:58] (current) pdmatei |
||
---|---|---|---|
Line 34: | Line 34: | ||
def head: Int | def head: Int | ||
def tail: OList | def tail: OList | ||
- | def foldRight(acc: Int)(op: (Int,Int) => Int): Int | + | def foldRight[B](acc: B)(op: (Int,B) => B): B |
- | def foldLeft(acc: Int)(op: (Int,Int) => Int): Int | + | def foldLeft[B](acc: B)(op: (B,Int) => B): B |
def indexOf(i: Int): Int | def indexOf(i: Int): Int | ||
def filter(p: Int => Boolean): OList | def filter(p: Int => Boolean): OList |