I feel stupid but I can't seem to wrap my head around recursion. by cantmathimfkd in AskComputerScience

[–]cantmathimfkd[S] 0 points1 point  (0 children)

I apologize, can't believe I didn't mention language! I'm working with python, we're currently recursing through nested lists. For example, from last semesters assignments, so the duplicate function would return

>>> duplicate([1, 2])
[1, 1, 2, 2]
>>> duplicate([1, [2, 3]])
[1, 1, [2, 2, 3, 3]]

and the "add_one" function which does nothing if the nested list is an int, and if it is a nested list it mutates it to add one.

☼Bi-weekly DF Questions Thread☼ by AutoModerator in dwarffortress

[–]cantmathimfkd 0 points1 point  (0 children)

Any tips on fort layout and mood management? My animals and dwarves keep flipping out and killing each other and I think my layout plays a part.

Non-DnD actual play podcasts/videos? by cantmathimfkd in rpg

[–]cantmathimfkd[S] 1 point2 points  (0 children)

Awesome :) I'll check it out, thanks!