2 ms·
You can reduce the risk with types. If you use flip, you're not doing that, which makes flip not a very good solution here.
by Dylan16807 1y ago
You can reduce the risk with types. If you use flip, you're not doing that, which makes flip not a very good solution here.
- addaon 1y agoYep. The right solution here is to make latitude and longitude distinct types. The way to turn that into an even wronger solution is to create a helper just_apply(function, lat, long) that passes the arguments to the function in the (hopefully unique) order that successfully works; so flip if needed, based on function’s type signature.