- screenshots of scores posted in comments
- screenshots of completed sections posted in comments
| require 'erb' | |
| class Num | |
| def initialize(num) | |
| @n = num | |
| end | |
| end | |
| # okay, some object we want to evaluate our ERB within, | |
| # to do that we need a binding for it |
| # ----- Common Linked List Methods ----- | |
| def add_to_front(list, data) | |
| build_list(data, list) | |
| end | |
| def add_to_back(list, data) | |
| return build_list(data, empty_list) if empty?(list) | |
| new_tail = add_to_back(tail(list), data) | |
| build_list(head(list), new_tail) |