Talk:Learning Haskell with Chess: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==list handling vs. abstract data types (array)== | ==list handling vs. abstract data types (array)== | ||
Lists are very inefficient, but understanding list handling is important for understanding functional programming. On the other hand, using <hask>Array</hask> would provide understanding for abstract data types. | |||
==full ruleset vs. reduced and simplified ruleset== | ==full ruleset vs. reduced and simplified ruleset== | ||
To implement the full ruleset you have to remember and consider previous states (in particular for castling rule and capturing en passant). | |||
==representation of positions== | ==representation of positions== | ||
Is <hask>type Pos = (Int,Int)</hask> ok? Or better something like <hask>type Pos = (Row, Column), data Row = A | B | ... | H, data Column = ?</hask>. How to model the constraints (0<=x,y<=7)? | Is <hask>type Pos = (Int,Int)</hask> ok? Or better something like <hask>type Pos = (Row, Column), data Row = A | B | ... | H, data Column = ?</hask>. How to model the constraints (0<=x,y<=7)? |
Revision as of 08:48, 19 March 2007
list handling vs. abstract data types (array)
Lists are very inefficient, but understanding list handling is important for understanding functional programming. On the other hand, using Array
would provide understanding for abstract data types.
full ruleset vs. reduced and simplified ruleset
To implement the full ruleset you have to remember and consider previous states (in particular for castling rule and capturing en passant).
representation of positions
Is type Pos = (Int,Int)
ok? Or better something like type Pos = (Row, Column), data Row = A | B | ... | H, data Column = ?
. How to model the constraints (0<=x,y<=7)?