Difference between revisions of "FP Homework 3"

From Marek Běhálek Wiki
Jump to navigation Jump to search
(Created page with "= Immutable data types = == Immutable Array == <syntaxhighlight lang="Haskell"> data Point = Point Int Int data Shape = Circle Point Int | Rectangle {topLeft:: Poi...")
(No difference)

Revision as of 09:56, 31 October 2022

Immutable data types

Immutable Array

data Point = Point Int Int
data Shape = Circle Point Int
           | Rectangle {topLeft:: Point, bottomRight::Point}