- Aggregated Pivot Table
- Bit Shifting
- Bitwise XOR
- Calculate Tick Size
- Collapsing Dictionaries
- Graphs - Breadth First Search
- Graphs - Depth First Search
- Graphs - Detecting Cycles
- Greatest Common Divisor
- Identity Matrix
- Least Common Multiple
- Log Parser
- Nanosleep
- One Hot Encoding
- Parent Child ID Mapping
- Slippage
- Split Training and Testing Sets
- Stratified Sampling
- Symbol Column Update
- Table Indexing
- Word Count
Infix Notation
Question: Infix notation is characterized by the placement of operators between operands, ex. '2+2'. Functions cannot be used infix, unless they are defined in the .q namespace. Define a function 'add' that takes in two arguments and adds them, and enable your function to be used infix.
More Information:
https://en.wikipedia.org/wiki/Infix_notationExample
q)1 2 3 add 3 4 5
4 6 8
q)1 add 3
4
Solution
######## solution.q ########
.q.add:+
Explanation: To add a function to the '.q' namespace, prefix the function name with '.q'.