the swift programming language is my fault to some degree. mostly here to see dogs, shitpost, fix old computers, and/or talk about math and weird computer programming things. for effortposts check the #longpost pinned tag. asks are open.
there’s just a tiny problem if you look at the type signatures:
map :: List a -> (a -> b) -> List b
bind :: List a -> (a -> List b) -> List b
you might expect
map = bind
to be … slightly mistyped
yeah the layers of wrong here are interesting. traditional BASIC also doesn't support named multi-line subroutines at all (and while you can define one-line functions they have to all be named FNA, FNB, FNC, etc., and there aren't any higher-order functions)
i wonder if it's extrapolating from python syntax which also uses def to declare functions, and then trying to translate an (incorrect) python monad tutorial into something that looks like basic
these chatbots would be much more interesting if they credited their sources!
It is as if the program just learned the general structure of things, not the meaning :P