Sha256: f0bc872185d4533803d19e3efb2caec51986e987833583516123663b4991c437
Contents?: true
Size: 393 Bytes
Versions: 87
Compression:
Stored size: 393 Bytes
Contents
handshake <- function(n) { # 1 = wink # 10 = double blink # 100 = close your eyes # 1000 = jump # 10000 = reverse actions = c("wink", "double blink", "close your eyes", "jump") bin = intToBits(n) events = c() for (i in 1:4){ if (bin[i] > 0) { events = c(events, actions[i]) } } if (bin[5] > 0) { events = rev(events) } events }
Version data entries
87 entries across 87 versions & 1 rubygems