This is a implementation of the closure of a set of attributes generator in JavaScript.
letout=finds([{from: ["A"],to: ["B"]},{from: ["B"],to: ["D"]},{from: ["A"],to: ["K"]},{from: ["K"],to: ["C"]},],["A"]);letout=finds([{from: ["T"],to: ["U"]},{from: ["V"],to: ["S","W"]},{from: ["S"],to: ["T"]},],["S","V"]);// S, V, W, T, Uletout=finds([{from: ["T"],to: ["U"]},{from: ["V"],to: ["S","W"]},{from: ["S"],to: ["T"]},],["V"]);// V, S, W, T, Uletout=finds([{from: ["T"],to: ["U"]},{from: ["V"],to: ["S","W"]},{from: ["S"],to: ["T"]},],["S"]);// S, T, Uletout=finds([{from: ["U"],to: ["V","X","Q"]},{from: ["U","V","P"],to: ["O"]},{from: ["O","Q"],to: ["Y","Z"]},{from: ["U","P"],to: ["X","Y"]},],["U","P"]);// U, P, V, X, Q, O, Y, Zletout=finds([{from: ["U"],to: ["V","X","Q"]},{from: ["U","V","P"],to: ["O"]},{from: ["O","Q"],to: ["Y","Z"]},{from: ["U","P"],to: ["X","Y"]},],["O","Q"]);// O, Q, Y, Zletout=finds([{from: ["U"],to: ["V","X","Q"]},{from: ["U","V","P"],to: ["O"]},{from: ["O","Q"],to: ["Y","Z"]},{from: ["U","P"],to: ["X","Y"]},],["U","P","W"]);// U, P, W, V, X, Q, O, Y, ZGPL-3.0
© Copyright (c) 2022, Max Base