Skip to content

Commit

Permalink
Make sure everything inlines.
Browse files Browse the repository at this point in the history
L.drop does not inline because it is recursive.

Co-authored-by: Xia Li-yao <[email protected]>
  • Loading branch information
kindaro and Lysxia authored Feb 15, 2024
1 parent 0458012 commit 4faa72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/Text/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ inits = (NE.toList P.$!) . initsNE
initsNE :: Text -> NonEmpty Text
initsNE = (Empty NE.:|) . inits'
where inits' Empty = []
inits' (Chunk t ts) = L.map (\t' -> Chunk t' Empty) (L.drop 1 (T.inits t))
inits' (Chunk t ts) = L.map (\t' -> Chunk t' Empty) (NE.tail (T.initsNE t))
++ L.map (Chunk t) (inits' ts)

-- | /O(n)/ Return all final segments of the given 'Text', longest
Expand Down

0 comments on commit 4faa72c

Please sign in to comment.