Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
30cfda50
Unverified
Commit
30cfda50
authored
Mar 26, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring: Monoid on (,) does the right thing
parent
daba6a47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
NgramsByNode.hs
src/Gargantext/Database/Metrics/NgramsByNode.hs
+2
-3
No files found.
src/Gargantext/Database/Metrics/NgramsByNode.hs
View file @
30cfda50
...
...
@@ -101,9 +101,8 @@ groupNodesByNgramsWith :: (Text -> Text)
->
Map
Text
(
Set
NodeId
)
->
Map
Text
(
Set
Text
,
Set
NodeId
)
groupNodesByNgramsWith
f
m
=
fromListWith
(
\
a
b
->
(
fst
a
<>
fst
b
,
snd
a
<>
snd
b
))
$
map
(
\
(
t
,
ns
)
->
(
f
t
,
(
Set
.
singleton
t
,
ns
)))
$
toList
m
fromListWith
(
<>
)
$
map
(
\
(
t
,
ns
)
->
(
f
t
,
(
Set
.
singleton
t
,
ns
)))
$
toList
m
------------------------------------------------------------------------
getNodesByNgramsUser
::
CorpusId
->
NgramsType
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment