Teacup rim text: Difference between revisions
m
→Python :: Functional: Tidying
(Added C solution) |
m (→Python :: Functional: Tidying) |
||
Line 1,235:
'''
def go(ws):
[snd(x) for x in xs]
] if n <= len(xs) >= len(xs[0][0]) else []
return concatMap(f)(groupBy(fst)(sorted(
)))▼
key=fst▼
▲ )
Line 1,285 ⟶ 1,281:
(0, True, rotated(w))
)[1]
▲ return lambda s: go(s)
Line 1,306 ⟶ 1,301:
(using an empty list to represent computational failure).
'''
return chain.from_iterable(map(f, xs))
Line 1,323 ⟶ 1,318:
in terms of the key function f.
'''
]
return go
Line 1,377 ⟶ 1,374:
over a start value of x.
'''
def go(f
def g(
return
return g
return go
Line 1,392 ⟶ 1,391:
The initial seed value is x.
'''
def go(f
return g
return go
|