Skip to content

Commit

Permalink
Use infix operator of MapApply
Browse files Browse the repository at this point in the history
Fixes #279
  • Loading branch information
dishmint committed Feb 3, 2024
1 parent 1db0188 commit b049e56
Show file tree
Hide file tree
Showing 2 changed files with 432 additions and 430 deletions.
4 changes: 2 additions & 2 deletions FaizonZaman/LexicalCases/Kernel/LexicalCases.wl
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ StripNames[True, c_Condition] := c
StripNames[True, se_?LexicalPatternQ] := Replace[se, p_Pattern :> Extract[2][p], Infinity]
StripNames[False,se_?LexicalPatternQ]:= se

PrependArticleKey[{article_String, data_List}] := Map[Apply[Prepend]]@Thread[{data, "Article" -> article}]
PrependArticleKey[{article_String, data_List}] := Prepend@@@Thread[{data, "Article" -> article}]
PrependArticleKey[{article_String, data_Missing}] := <|"Article" -> article, "Match" -> data, "Position" -> {}|>

PrependArticleKey[{article_Integer, data_List}] := Map[Apply[Prepend]]@Thread[{data, "Article" -> article}]
PrependArticleKey[{article_Integer, data_List}] := Prepend@@@Thread[{data, "Article" -> article}]
PrependArticleKey[{article_Integer, data_Missing}] := <|"Article" -> article, "Match" -> data, "Position" -> {}|>

(* Text Cleanup *)
Expand Down
Loading

0 comments on commit b049e56

Please sign in to comment.