Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
fp2023:lab03 [2023/03/15 08:52] pdmatei |
fp2023:lab03 [2023/03/15 13:06] (current) bogdan.butnariu added offset for Line2D Functions |
||
---|---|---|---|
Line 50: | Line 50: | ||
<code scala> | <code scala> | ||
type Line2D = Int => Int | type Line2D = Int => Int | ||
- | def translateOx(l: Line2D): Line2D = ??? | + | def translateOx(offset: Int)(l: Line2D): Line2D = ??? |
</code> | </code> | ||
**3.9.** (!) Write a function which takes a Line2D and translates it up on the Oy axis by a given offset. | **3.9.** (!) Write a function which takes a Line2D and translates it up on the Oy axis by a given offset. | ||
<code scala> | <code scala> | ||
- | def translateOy(l: Line2D): Line2D = ??? | + | def translateOy(offset: Int)(l: Line2D): Line2D = ??? |
</code> | </code> | ||