No Collusion

The Bellman’s rule: What I tell you three times is true!

But 16 times is fine too.

001    “Just the place for a Snark!” the Bellman cried,
002        As he landed his crew with care;
003    Supporting each man on the top of the tide
004        By a finger entwined in his hair.

005    “Just the place for a Snark! I have said it twice:
006        That alone should encourage the crew.
007    Just the place for a Snark! I have said it thrice:
008        What I tell you three times is true.”

329    “’Tis the voice of the Jubjub!” he suddenly cried.
330        (This man, that they used to call “Dunce.”)
331    “As the Bellman would tell you,” he added with pride,
332        “I have uttered that sentiment once.

333    “’Tis the note of the Jubjub! Keep count, I entreat;
334        You will find I have told it you twice.
335    ’Tis the song of the Jubjub! The proof is complete,
336        If only I’ve stated it thrice.”

 

The Bellman’s Rule is stated in Lewis Carroll’s The Hunting of the Snark, line #7 and line #335. I said it in Lua – wrote it in Python, I made that indeed, but I wholly forgot (when finally done), that Haskell is what you need! So, here is an example for how to implement that rule:

#! /usr/bin/haskell
import Data.List
statementList :: [String]
statementList =
  ["No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"I am a stable genius!"
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"I am a stable genius!"
  ,"No collusion."
  ,"No collusion."
  ,"No collusion."
  ,"I am a stable genius!"
  ,"No collusion."
  ,"1+1=2."
  ,"No collusion."
  ,"No collusion."
  ,"Collusion is not a crime."
  ,"Collusion is not a crime."
  ,"Collusion is not a crime."
  ]
atLeastThrice :: [String] -> [String]
atLeastThrice sL =
  [head grp | grp <-
    group $ sort sL, length grp >= 3]

Result (if loaded and executed in GHCi):

*Main> atLeastThrice statementList
["Collusion is not a crime.","I am a stable genius!","No collusion."]

 
back | meme4trump 1 | meme4rtrump 2