Created
November 17, 2013 14:25
-
-
Save dcrystalj/7513991 to your computer and use it in GitHub Desktop.
questions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* kaj tole nardi ubistvu ? *) | |
| datatype ('a, 'b) seznam = | |
| Elementa of ('a * ('a, 'b) seznam) | |
| | Elementb of ('b * ('a, 'b) seznam) | |
| | konec | |
| (* zakaj ni polimorfna *) | |
| fun vsota_el sez = | |
| case sez of | |
| [h] => h | |
| | glava::rep => glava + vsota_el rep | |
| (* zakaj ni option 'a ?*) | |
| datatype 'a option = NEKI of 'a | NIC | |
| fun valof y = | |
| case y of | |
| NEKI x => x | |
| (* zakaj ne prevede exeption list*) | |
| exception EnaDva of int list | |
| handle EnaDva => [0] | |
| (* kaj to dela *) | |
| (List.tabulate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment