1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +03:00

Add an UnmappedTerm type to clarify control flow.

This commit is contained in:
Rob Rix 2016-07-07 11:05:50 -04:00
parent 524f71916b
commit 09ea3c1a76

View File

@ -44,6 +44,9 @@ rws compare getLabel as bs
pure [ (i, compared) ]
deleteRemaining diffs unmapped = foldl' (flip (List.insertBy (comparing fst))) (join diffs) ((,) (negate 1) . delete . snd . snd <$> unmapped)
data UnmappedTerm leaf annotation = UnmappedTerm { index :: {-# UNPACK #-} !Int, feature :: !(Vector.Vector Double), term :: !(Term leaf annotation) }
deriving Eq
longestIncreasingSubsequence :: Ord a => [a] -> [a]
longestIncreasingSubsequence = longestOrderedSubsequenceBy (<)