Jump to content

Knight's tour: Difference between revisions

m
→‎Functional JS: (enlarged the domain of the fromAlgebraic function)
m (→‎Functional JavaScript: (simplified the warnsdorff function definition slightly with a curried minimumBy))
m (→‎Functional JS: (enlarged the domain of the fromAlgebraic function))
Line 3,874:
// fromAlgebraic :: String -> (Int, Int)
const fromAlgebraic = s =>
2 =<= s.length ? (
[ord(s[0]) - 96, ord(s[1]) - 48]
) : undefined;
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.