3 ms·
I think the sticking points are: 1. You cannot return anything (say an immutable result that has consumed the input) Okay, so don't return anything, just muta
by Waterluvian 8mo ago
I think the sticking points are:
1. You cannot return anything (say an immutable result that has consumed the input)
Okay, so don't return anything, just mutate the original. Except:
2. You cannot mutate the original, return nothing, but the mutated original isn't a subset of the original. For example: https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABBOBbADgJwKYGdcBiccAPACoB8AFHAEYBWAXImYgJTMCG+2mUuiOvUQwBAb2RoseXNgAmzAKowwUABwBBTJk4BPRAF9EYgwChTKMLiiJgxRAF5jiOZyidmAIgA2cfoOBEcBQMHB45FzdOTwMAblM7OAA6V3dEAHp0xAAZbCgAcgF0OABrbEQ3RCgAC3LgqTDZCNTOJPNMnLzCxGkobDAIgHdywc5VKrhJUJlbezGh7HycHpgIEv1OWjgQGxrRRFQdtxUAcyrawUwYE5VOb0RcSd1t5DHEMGwAN14JkAhqkQ2TgnTgqNohaT4IhwKiJNjxcyJJIQxryDJZAASvEWAhq5RRMjRYRA3igbSRLXRiEUALg1QANIgAJKvJDWGDee6cCAQGZ4y7XW73TxyPBQTBwXTyTyRdxtUxAA https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABB...
- darick 8mo agoHmm, I see, yes it's quite limited.