λ-2d, 456 squares
the program can be imported in the playground with the following JSON file
{"41,13":"entry","41,18":"entry","41,23":"entry","41,28":"entry","41,32":"entry","42,13":"end_s","42,18":"end_s","42,23":"end_s","42,28":"end_s","42,32":"end_s","43,13":"end_e","43,18":"end_e","43,23":"end_e","43,28":"end_e","43,32":"end_e","39,15":"wire_nw","39,20":"wire_nw","39,25":"wire_nw","39,30":"wire_nw","39,34":"wire_nw","38,15":"wire_ne","38,20":"wire_ne","38,25":"wire_ne","38,30":"wire_ne","38,34":"wire_ne","44,13":"frame_tl","44,18":"frame_tl","44,23":"frame_tl","44,28":"frame_tl","44,32":"frame_tl","45,13":"wire_we","45,18":"wire_we","45,23":"wire_we","45,28":"wire_we","45,32":"wire_we","46,13":"wire_we","46,18":"wire_we","46,23":"wire_we","46,28":"wire_we","46,32":"wire_we","47,13":"wire_we","47,18":"wire_we","47,23":"wire_we","47,28":"wire_we","47,32":"wire_we","47,15":"wire_we","47,20":"wire_we","47,25":"wire_we","47,30":"wire_we","47,34":"wire_we","46,15":"wire_we","46,20":"wire_we","46,25":"wire_we","46,30":"wire_we","46,34":"wire_we","45,15":"wire_we","45,20":"wire_we","45,25":"wire_we","45,30":"wire_we","45,34":"wire_we","48,13":"wire_sw","48,18":"wire_sw","48,23":"wire_sw","48,28":"wire_sw","48,32":"wire_sw","48,15":"wire_nw","48,20":"wire_nw","48,25":"wire_nw","48,30":"wire_nw","48,34":"wire_nw","44,15":"wire_ne","44,20":"wire_ne","44,25":"wire_ne","44,30":"wire_ne","44,34":"wire_ne","44,14":"wire_ns","44,19":"wire_ns","44,24":"wire_ns","44,29":"wire_ns","44,33":"wire_ns","48,14":"wire_ns","48,19":"wire_ns","48,24":"wire_ns","48,29":"wire_ns","48,33":"wire_ns","42,14":"wire_nw","42,19":"wire_nw","42,24":"wire_nw","42,29":"wire_nw","42,33":"wire_nw","41,14":"wire_we","41,19":"wire_we","41,24":"wire_we","41,29":"wire_we","41,33":"wire_we","40,14":"wire_we","40,19":"wire_we","40,24":"wire_we","40,29":"wire_we","40,33":"wire_we","38,14":"wire_sw","38,19":"wire_sw","38,24":"wire_sw","38,29":"wire_sw","38,33":"wire_sw","39,14":"func_call","39,19":"func_call","39,24":"func_call","39,29":"func_call","39,33":"func_call","39,13":"joint_nsw","39,18":"joint_nsw","39,23":"joint_nsw","39,28":"joint_nsw","38,13":"wire_we","38,18":"wire_we","38,23":"wire_we","38,28":"wire_we","37,13":"wire_se","37,18":"wire_se","37,23":"wire_se","37,28":"wire_se","37,14":"wire_nswe","37,19":"wire_nswe","37,24":"wire_nswe","37,29":"wire_nswe","37,17":"wire_nw","37,22":"wire_nw","37,27":"wire_nw","37,32":"wire_nw","36,17":"wire_se","36,22":"wire_se","36,27":"wire_se","36,32":"wire_se","37,15":"wire_ns","37,20":"wire_ns","37,25":"wire_ns","37,30":"wire_ns","36,15":"wire_nw","36,20":"wire_nw","36,25":"wire_nw","36,30":"wire_nw","36,34":"wire_nw","35,15":"wire_ne","35,20":"wire_ne","35,25":"wire_ne","35,30":"wire_ne","35,34":"wire_ne","35,14":"wire_sw","35,19":"wire_sw","35,24":"wire_sw","35,29":"wire_sw","35,33":"wire_sw","36,14":"func_call","36,19":"func_call","36,24":"func_call","36,29":"func_call","36,33":"func_call","36,13":"joint_nsw","36,18":"joint_nsw","36,23":"joint_nsw","36,28":"joint_nsw","35,13":"wire_we","35,18":"wire_we","35,23":"wire_we","35,28":"wire_we","34,13":"wire_se","34,18":"wire_se","34,23":"wire_se","34,28":"wire_se","34,14":"wire_nswe","34,19":"wire_nswe","34,24":"wire_nswe","34,29":"wire_nswe","34,17":"wire_nw","34,22":"wire_nw","34,27":"wire_nw","34,32":"wire_nw","33,17":"wire_se","33,22":"wire_se","33,27":"wire_se","33,32":"wire_se","34,15":"wire_ns","34,20":"wire_ns","34,25":"wire_ns","34,30":"wire_ns","33,15":"wire_nw","33,20":"wire_nw","33,25":"wire_nw","33,30":"wire_nw","33,34":"wire_nw","32,15":"wire_ne","32,20":"wire_ne","32,25":"wire_ne","32,30":"wire_ne","32,34":"wire_ne","32,14":"wire_sw","32,19":"wire_sw","32,24":"wire_sw","32,29":"wire_sw","32,33":"wire_sw","33,14":"func_call","33,19":"func_call","33,24":"func_call","33,29":"func_call","33,33":"func_call","33,13":"joint_nsw","33,18":"joint_nsw","33,23":"joint_nsw","33,28":"joint_nsw","32,13":"wire_we","32,18":"wire_we","32,23":"wire_we","32,28":"wire_we","31,13":"wire_se","31,18":"wire_se","31,23":"wire_se","31,28":"wire_se","31,14":"wire_nswe","31,19":"wire_nswe","31,24":"wire_nswe","31,29":"wire_nswe","31,17":"wire_nw","31,22":"wire_nw","31,27":"wire_nw","31,32":"wire_nw","30,17":"wire_se","30,22":"wire_se","30,27":"wire_se","30,32":"wire_se","31,15":"wire_ns","31,20":"wire_ns","31,25":"wire_ns","31,30":"wire_ns","30,15":"wire_nw","30,20":"wire_nw","30,25":"wire_nw","30,30":"wire_nw","30,34":"wire_nw","29,15":"wire_ne","29,20":"wire_ne","29,25":"wire_ne","29,30":"wire_ne","29,34":"wire_ne","29,14":"wire_sw","29,19":"wire_sw","29,24":"wire_sw","29,29":"wire_sw","29,33":"wire_sw","30,14":"func_call","30,19":"func_call","30,24":"func_call","30,29":"func_call","30,33":"func_call","30,13":"joint_nsw","30,18":"joint_nsw","30,23":"joint_nsw","30,28":"joint_nsw","29,13":"wire_we","29,18":"wire_we","29,23":"wire_we","29,28":"wire_we","28,13":"wire_se","28,18":"wire_se","28,23":"wire_se","28,28":"wire_se","28,14":"wire_nswe","28,19":"wire_nswe","28,24":"wire_nswe","28,29":"wire_nswe","28,17":"wire_nw","28,22":"wire_nw","28,27":"wire_nw","28,32":"wire_nw","27,17":"wire_se","27,22":"wire_se","27,27":"wire_se","27,32":"wire_se","28,15":"wire_ns","28,20":"wire_ns","28,25":"wire_ns","28,30":"wire_ns","27,14":"func_call","27,19":"func_call","27,24":"func_call","27,29":"func_call","27,33":"func_call","27,13":"joint_nsw","27,18":"joint_nsw","27,23":"joint_nsw","27,28":"joint_nsw","26,13":"wire_se","26,18":"wire_se","26,23":"wire_se","26,28":"wire_se","26,14":"wire_ns","26,19":"wire_ns","26,24":"wire_ns","26,29":"wire_ns","26,15":"wire_ns","26,20":"wire_ns","26,25":"wire_ns","26,30":"wire_ns","26,16":"wire_ne","26,21":"wire_ne","26,26":"wire_ne","26,31":"wire_ne","27,16":"wire_we","27,21":"wire_we","27,26":"wire_we","27,31":"wire_we","29,16":"wire_we","29,21":"wire_we","29,26":"wire_we","29,31":"wire_we","30,16":"wire_we","30,21":"wire_we","30,26":"wire_we","30,31":"wire_we","32,16":"wire_we","32,21":"wire_we","32,26":"wire_we","32,31":"wire_we","33,16":"wire_we","33,21":"wire_we","33,26":"wire_we","33,31":"wire_we","35,16":"wire_we","35,21":"wire_we","35,26":"wire_we","35,31":"wire_we","36,16":"wire_we","36,21":"wire_we","36,26":"wire_we","36,31":"wire_we","39,16":"wire_sw","39,21":"wire_sw","39,26":"wire_sw","39,31":"wire_sw","39,17":"wire_ns","39,22":"wire_ns","39,27":"wire_ns","39,32":"wire_ns","38,16":"wire_we","38,21":"wire_we","38,26":"wire_we","38,31":"wire_we","28,16":"wire_nswe","28,21":"wire_nswe","28,26":"wire_nswe","28,31":"wire_nswe","31,16":"wire_nswe","31,21":"wire_nswe","31,26":"wire_nswe","31,31":"wire_nswe","34,16":"wire_nswe","34,21":"wire_nswe","34,26":"wire_nswe","34,31":"wire_nswe","37,16":"wire_nswe","37,21":"wire_nswe","37,26":"wire_nswe","37,31":"wire_nswe","28,33":"wire_we","31,33":"wire_we","34,33":"wire_we","37,33":"wire_we","39,12":"num_7","40,12":"num_8","41,12":"num_9","36,11":"num_8","37,11":"num_0","38,11":"num_6","33,12":"num_8","34,12":"num_1","35,12":"num_3","30,11":"num_7","31,11":"num_9","32,11":"num_4","28,12":"num_9","29,12":"num_8","27,12":"num_7","30,12":"wire_ns","36,12":"wire_ns","27,15":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"27,20":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"27,25":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"27,30":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"27,34":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"53,12":"func_def","55,12":"func_def","57,12":"func_def","59,12":"func_def","61,12":"func_def","54,12":"end_s","58,12":"end_s","56,12":"end_s","60,12":"end_s","62,12":"end_s","63,12":"end_e","54,11":"label","55,11":[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],"53,11":"wire_se","54,13":"joint_nse","55,16":"op_plus","57,16":"op_plus","59,16":"op_plus","61,16":"op_plus","55,15":"func_call","57,15":"func_call","59,15":"func_call","61,15":"func_call","56,13":"wire_nswe","58,13":"wire_nswe","61,13":"wire_we","60,13":"wire_nswe","62,13":"wire_nswe","59,13":"wire_we","57,13":"wire_we","55,13":"wire_we","55,14":"wire_sw","54,14":"wire_ne","56,15":"wire_nw","58,15":"wire_nw","60,15":"wire_nw","57,14":"wire_sw","59,14":"wire_sw","60,14":"func_call","61,14":"wire_sw","56,14":"func_call","58,14":"func_call","62,14":"func_call","62,15":"wire_nw","63,14":"wire_sw","63,15":"wire_ns","63,16":"func_call","63,17":"op_div","64,16":"wire_nw","64,15":"func_call","64,14":"num_4","65,15":"wire_sw","65,16":"func_call","65,17":"op_minus","66,16":"wire_nw","66,14":"func_call","67,14":"wire_nw","66,13":"wire_sw","67,12":"wire_sw","66,15":"wire_ns","67,13":"wire_ns","63,13":"wire_we","64,13":"wire_we","65,13":"wire_we","64,12":"wire_we","65,12":"wire_we","66,12":"wire_we"}
the function in itself is the right structure, the left one being 5 calls to the function with the 5 arguments in differents orders
js equivalent
a=798
b=794
c=813
d=806
e=789
f=v=>w>=>x=>y=>z=>((v+w+x+y+z)/4)-v
f(a)(b)(c)(d)(e)
f(b)(c)(d)(e)(a)
f(c)(d)(e)(a)(b)
f(d)(e)(a)(b)(c)
f(e)(a)(b)(c)(d)
Language explanation can be found in the playground by loading the cheatsheet example, or in the release blog post