is there any way to use scoreboards as macros in a function?

let's say i have functionA: $function namespace:functionB {Foo:$(bar)} and that i wanna call it in a way such that $(bar) is equal to the scoreboard bar applied to the current entity, similarly to how you can call a function with a stored NBT value. ideally, the command to do this would be something like: function namespace:functionA with scoreboard @s but this unfortunately isn't currently possible. how could i do this?

Continue to help post