Skip to content

Instantly share code, notes, and snippets.

View tuscen's full-sized avatar
🐼

Aleksey Usatov tuscen

🐼
View GitHub Profile
def conjunctionSelect obj,arg,*args
res = []
for i in obj
res << i if ([arg]+args).inject do |acc,n|
n.call(i) && acc.call(i)
end
#res << i if ([arg]+args).all? {|n| n.call(i)}
end
res
end