Skip to main content
added 110 characters in body
Source Link
njpipeorgan
  • 3.1k
  • 14
  • 15

Mathematica, 76 bytes

Note that n should have no definitions before.

0;If[ValueQ@n,++n,n=0];StringJoin@Riffle[IntegerString[nn=1];StringJoin@Riffle[IntegerString[n,#]&/@{8,10,8,16}," "]

Here, the behaviour of ; is used. The snippet above is one single CompoundExpression, however, when a couple of snippets are put together, there is still one CompoundExpression as is shown below. (Some unnecessary rearrangements are made.)

0;
If[ValueQ@n,++n,n=0];n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,8,16}," "] 0;
If[ValueQ@n,++n,n=0];n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,8,16}," "] 0;
If[ValueQ@n,++n,n=0];n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,8,16}," "]

(* 3 3 3 *)

So one cannot make such snippet works if writting explicit CompoundExpression. Also, almost everything you like can be put before the first ; such as E, Pi or MandelbrotSetPlot[],.

Mathematica, 76 bytes

Note that n should have no definitions before.

0;If[ValueQ@n,++n,n=0];StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "]

Here, the behaviour of ; is used. The snippet above is one single CompoundExpression, however, when a couple of snippets are put together, there is still one CompoundExpression as is shown below. (Some unnecessary rearrangements are made.)

0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "] 0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "] 0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "]

(* 3 3 3 *)

So one cannot make such snippet works if writting explicit CompoundExpression.

Mathematica, 76 bytes

Note that n should have no definitions before.

0;If[ValueQ@n,++n,n=1];StringJoin@Riffle[IntegerString[n,#]&/@{10,8,16}," "]

Here, the behaviour of ; is used. The snippet above is one single CompoundExpression, however, when a couple of snippets are put together, there is still one CompoundExpression as is shown below. (Some unnecessary rearrangements are made.)

0;
If[ValueQ@n,++n,n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{10,8,16}," "] 0;
If[ValueQ@n,++n,n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{10,8,16}," "] 0;
If[ValueQ@n,++n,n=1]; StringJoin@Riffle[IntegerString[n,#]&/@{10,8,16}," "]

(* 3 3 3 *)

So one cannot make such snippet works if writting explicit CompoundExpression. Also, almost everything you like can be put before the first ; such as E, Pi or MandelbrotSetPlot[],.

Source Link
njpipeorgan
  • 3.1k
  • 14
  • 15

Mathematica, 76 bytes

Note that n should have no definitions before.

0;If[ValueQ@n,++n,n=0];StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "]

Here, the behaviour of ; is used. The snippet above is one single CompoundExpression, however, when a couple of snippets are put together, there is still one CompoundExpression as is shown below. (Some unnecessary rearrangements are made.)

0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "] 0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "] 0;
If[ValueQ@n,++n,n=0]; StringJoin@Riffle[IntegerString[n,#]&/@{8,10,16}," "]

(* 3 3 3 *)

So one cannot make such snippet works if writting explicit CompoundExpression.