Talk:Weird numbers: Difference between revisions

(→‎A faster and less ambitious algorithm ?: (Showed a variant of hasSum which returns any first sum found))
Line 20:
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 11:52, 24 March 2019 (UTC)
 
: PS I think we may be able to see and test the operation of '''hasSum''' more clearly if we enrich its type from Bool to [Int] (with a return value of the empty list for '''False''', and the integers of the first sum found for '''True'''. Let's call this richer-typed variant '''anySum''', and sketch it in Python 3.
 
::<lang python># anySum :: Int -> [Int] -> [Int]
9,655

edits