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:
parent
0bb6462fad
commit
ad6e7f2ae7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user