Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
fp2023:lab04 [2023/03/24 12:07] pdmatei |
fp2023:lab04 [2023/03/24 14:53] (current) pdmatei |
||
|---|---|---|---|
| Line 40: | Line 40: | ||
| **4.7.** Implement ''max'' which returns the largest integer from a list: | **4.7.** Implement ''max'' which returns the largest integer from a list: | ||
| <code scala> | <code scala> | ||
| - | def max(l: Ilist): Int = ??? | + | def max(l: IList): Int = ??? |
| </code> | </code> | ||
| Line 50: | Line 50: | ||
| **4.9.** Implement ''drop'' which returns a new list containing the original list without the first ''n'' elements: | **4.9.** Implement ''drop'' which returns a new list containing the original list without the first ''n'' elements: | ||
| <code scala> | <code scala> | ||
| - | def take(n: Int)(l: IList): IList = ??? | + | def drop(n: Int)(l: IList): IList = ??? |
| </code> | </code> | ||