1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 09:55:52 +03:00

Tacit definition of slice.

This commit is contained in:
Rob Rix 2015-12-23 23:27:07 -05:00
parent 0bb6462fad
commit ad6e7f2ae7

View File

@ -13,7 +13,7 @@ toList :: Source a -> [a]
toList = Vector.toList . getVector
slice :: Range -> Source a -> Source a
slice range (Source vector) = Source $ Vector.slice (start range) (end range - start range) vector
slice range = Source . Vector.slice (start range) (end range - start range) . getVector
toString :: Source Char -> String
toString = toList