Commit c624d176 authored by mzheng's avatar mzheng

formating addGroup

parent 96a23581
...@@ -131,23 +131,26 @@ toGroupedTreeInstitutes'' m notEmpty institutesTree ...@@ -131,23 +131,26 @@ toGroupedTreeInstitutes'' m notEmpty institutesTree
-> Parent -> Parent
-> GroupedTreeScores score -> GroupedTreeScores score
-> GroupedTreeScores score -> GroupedTreeScores score
addGroup institutesTree' m' k v = addGroup institutesTree' dict' key val =
over gts'_children ( toGroupedTree'' m' over gts'_children
. case HashMap.lookup (unNgramsTerm k) institutesTree' of ( toGroupedTree'' dict'
Nothing -> HashMap.union ( fromMaybe mempty . case HashMap.lookup (unNgramsTerm key) institutesTree' of
$ HashMap.lookup (Just k) m' Nothing -> HashMap.union ( fromMaybe mempty
) $ HashMap.lookup (Just key) dict'
Just children -> HashMap.union (foldl (\acc child -> HashMap.union acc $ )
HashMap.singleton Just children
(NgramsTerm child) -> HashMap.union
GroupedTreeScores (foldl (\acc child
{ _gts'_score= _gts'_score v -> HashMap.union acc
, _gts'_listType= _gts'_listType v $ HashMap.singleton (NgramsTerm child) GroupedTreeScores
, _gts'_children= HashMap.empty { _gts'_score= _gts'_score val
}) HashMap.empty children , _gts'_listType= _gts'_listType val
) , _gts'_children= HashMap.empty
. HashMap.union ( fromMaybe mempty }
$ HashMap.lookup (Just k) m' ) HashMap.empty children
) )
) . HashMap.union ( fromMaybe mempty
v $ HashMap.lookup (Just key) dict'
\ No newline at end of file )
)
val
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment