3
\$\begingroup\$

It seems to be the consensus that it is acceptable in Brain-Flak to decompose a list into a series of arguments when taking input.

For example if you are to take the list [2,5,6] as input you may run the following Brain-Flak

ruby brain_flak.rb file 2 5 6

The same is also true of output, if you need to output the list [4,5,9] your program could print:

4
5
9

Other data types have other conventions, for example boolean values have their own meta question dictating what is acceptable.

The current consensus on all of these i/o methods makes sense however things get a little strange when you start mixing datatypes in your i/o

For example if you need to take both an integer and a list as input how do you do so?

If your list is [7,1,8] and your integer is 2 can you run:

ruby brain_flak.rb file 7 1 8 2

How about:

ruby brain_flak.rb file 2 7 1 8

And for Truthy values things get even murkier, if I need to output 7,True is

7
8
0
6

valid output? Normally

8
0
6

would be Truthy value on its own but it seems a little like cheating when other values start showing up.

How do we take mixed type i/o for programming languages that have similar memory structures to Brain-Flak?

\$\endgroup\$

You must log in to answer this question.

Browse other questions tagged .