FP Homework 3

From Marek Běhálek Wiki
Revision as of 09:56, 31 October 2022 by Beh01 (talk | contribs) (Created page with "= Immutable data types = == Immutable Array == <syntaxhighlight lang="Haskell"> data Point = Point Int Int data Shape = Circle Point Int | Rectangle {topLeft:: Poi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Immutable data types

Immutable Array

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