Age | Commit message (Collapse) | Author |
|
This generates a new list, and appends to it every time the current
list value satisfies the condition. It then recursively calls the
filter on the next value.
|
|
Basically accumulates values, check
https://en.wikipedia.org/wiki/Fold_(higher-order_function) for more
detail.
|
|
|
|
void return, just maps f onto every value in the linked list till
nullity.
|
|
C++ styling.
|
|
Pretty simple, returns the last node as that's the new root node.
Uses default parameters to make sure the first node has next set to null.
|
|
|
|
Just write a few lines and it saves so much time. Don't try to
automate it too much though.
|
|
Nice feature of C++, destructors make it kinda nice to do memory
management. Though they don't fully reduce the pain lol
|
|
Main now uses append and cout mechanisms for a simple program!
|
|
cout has inbuilt support for multiple types, easier than using
printf. Just have to ease the compiler into it
|
|
Slight whiplash from change to C++, can just use typename now.
|
|
Will have all the singly linked list algorithms I can think of, using
the structure I have defined (template based singly linked list) and
the simple append function I have added that also acts as the main
method of creating an instance.
|
|
|