As long as the function used can receive the number of params you're passing on, you can pass multiple collections to map.
(map str ["Y" "Y" "Z"] ["y" "y" "z"]) ; => ("Yy" "Yy" "Zz")You can pass the map a collection of functions.
| def retrieve_charges_from_payout(payout_id, stripe_custom_account) | |
| payout = Stripe::Payout.retrieve(payout_id, stripe_account: stripe_custom_account) | |
| balance_transaction = Stripe::BalanceTransaction.retrieve( | |
| payout.balance_transaction, stripe_account: stripe_custom_account | |
| ) | |
| balance_transaction_list = Stripe::BalanceTransaction.list( | |
| {payout: payout_id}, | |
| stripe_account: stripe_custom_account |
Functions have always the same structure: an operator and n operands. The operator can be a function or an expression that returns a function.
(+ 1 2 3 4) ;; => 10
(* 1 2 3 4) ;; => 24
(first [1 2 3 4]) ;; => 1
(or + -) ;; => returns another function: + (PLUS) in this case
((or + -) 10 20) ;; => 30
((first [+ -]) 10 20) ;; => 30| def virus_finder(n) | |
| rest = n | |
| total_five = 0 | |
| total_three = 0 | |
| while(rest >= 3 || rest >= 5) | |
| if(rest % 3 == 0) | |
| rest -= 3 | |
| total_five += 3 | |
| elsif(rest % 5 == 0) |
| MATCH n | |
| WHERE n:Track AND n:Bass | |
| RETURN n |
| MATCH (n) WHERE ID(n) = <id goes here> RETURN n |
| MATCH (t)<-[:ADDED_TO]-(addedT) RETURN t, addedT |