cenamus 8 hours ago

Is there a similarly short/simple solution not using all of the built ins? Haven't worked with prolog in a while but should be easy enough with primitives (albeit with more duplication)?

nurettin 8 hours ago

Why not just

    blocks(Rows, Blocks), maplist(all_distinct, Blocks), maplist(label, Rows)