Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nouns = RandomWord["Noun", 10] // Sort
- (* {"concrete", "curdling", "decoupage", "fairy", "hairline", "hick", "orchid", "referral", "sleepwear", "snorkel"} *)
- verbs = RandomWord["Verb", 100];
- integers = RandomInteger[{1, 100}, 10] // Sort;
- reals = RandomReal[{1, 100}, 100];
- BinCounts[reals, {integers}]
- (* {17, 0, 15, 1, 1, 11, 2, 25, 11} *)
- Function[v, SelectFirst[nouns, OrderedQ[{v, #}] &]] /@ verbs
Add Comment
Please, Sign In to add comment