Learning number 1: make functions fail early
When writing your own functions, avoid conversion of types without warning.
For example, this function only works on characters:
my_nchar

Continue reading: Some learnings from functional programming you can use to write …