mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-10-04 01:17:40 +03:00
Use Integer
in head
and last
.
This is a bit of an overkill, as clearly 0 doesn't need it, but it ensures maximum compatibility with the old behavior.
This commit is contained in:
parent
d599934038
commit
4f2cf7d5fa
@ -850,13 +850,13 @@ tail xs = drop`{1} xs
|
||||
* Return the first (left-most) element of a sequence.
|
||||
*/
|
||||
head : {n, a} [1 + n]a -> a
|
||||
head xs = xs @ (0 : [64])
|
||||
head xs = xs @ (0 : Integer)
|
||||
|
||||
/**
|
||||
* Return the right-most element of a sequence.
|
||||
*/
|
||||
last : {n, a} (fin n) => [1 + n]a -> a
|
||||
last xs = xs ! (0 : [64])
|
||||
last xs = xs ! (0 : Integer)
|
||||
|
||||
/**
|
||||
* Same as 'split', but with a different type argument order.
|
||||
|
Loading…
Reference in New Issue
Block a user