Sha256: d954b85179db3942d55de8a83a1c2ba6b11fc4f9e21c1bed3ada6f8176de6a47
Contents?: true
Size: 401 Bytes
Versions: 24
Compression:
Stored size: 401 Bytes
Contents
opposite-position(pos) { return bottom if pos == top; return top if pos == bottom; return right if pos == left; return left if pos == right; error('Invalid position ' + pos) } opposite(positions) { for pos in positions { pos = opposite-position(pos); ret = ret is defined ? ret pos : pos; } } body { foo: opposite(top); foo: opposite(left); foo: opposite(top left); }
Version data entries
24 entries across 24 versions & 1 rubygems