Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun reglist xs n = let
- val rownil = n div 3 * 3
- val rowone = rownil + 1
- val rowtwo = rowone + 1
- val colnil = n mod 3 * 3
- val colone = colnil + 1
- val coltwo = colone + 1
- in
- [ List.nth((List.nth(xs, rownil)), colnil), List.nth((List.nth(xs, rownil)), colone), List.nth((List.nth(xs, rownil)), coltwo),
- List.nth((List.nth(xs, rowone)), colnil), List.nth((List.nth(xs, rowone)), colone), List.nth((List.nth(xs, rowone)), coltwo),
- List.nth((List.nth(xs, rowtwo)), colnil), List.nth((List.nth(xs, rowtwo)), colone), List.nth((List.nth(xs, rowtwo)), coltwo) ]
- end;
Add Comment
Please, Sign In to add comment