import chess
import chess.svg
from IPython.display import SVG, display
from functools import reduce
def rcompose(*fs):
return reduce(lambda f, g: lambda *xs, **ys: g(f(*xs, **ys)), fs)
inline_board = rcompose(
chess.Board,
chess.svg.board,
SVG,
display)
Factor's quotations dealing with stack management weirdness is super nice, too.
https://pastebin.com/WQATnsBU