The Bellman’s rule: “What I tell you three times is true!”
Kelly Ramsdell Fineman told us …
… that President Theodore Roosevelt and Edith Wharton were huge fans of the Snark. On one visit to the White House, Wharton learned of the following exchange that occurred between the President and the Secretary of the Navy (undoubtedly unaware of Carroll’s poem, or at least unaware that Roosevelt was quoting):
During discussion, Roosevelt said to the secretary of the Navy,
“Mr. Secretary, what I tell you three times is true!”
The Secretary replied stiffly,
“Mr. President, it would never for a moment have occurred to me to impugn your veracity.”
So far for three times. But 16 times is fine too:
Trump sat for 30 minutes at his golf club with the Times. He said “no collusion” 16 times https://t.co/BOwHyvlCUb
— Amy Fiscus (@amyfiscus) December 29, 2017
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."]