\ ๐2 โถ / \ ๐3 ๐ / \ ๐ ๐3 / \ ๐ ๐2 / \ ๐ ๐1 / \ ๐ ๐0 ๐ / \ ๐0 ๐ / \ ๐1 ๐ / \ ๐2 ๐ / \ ๐3 ๐ ๐0 : (๐1 : ๐2 : ๐3 : ) ๐(๐ ๐ ๐ ๐, ๐0 , ๐1 , ๐2 , ๐3 ) ๐๐๐๐๐ ๐๐ ๐๐๐๐๐ ๐๐ ๐๐ = [๐0 , ๐1 , ๐2 , ๐3 ] ๐(๐0 , ๐(๐1 , ๐(๐2 , ๐(๐3 , ๐)))) ๐๐๐๐๐ = ๐; ๐๐๐๐๐ ๐ฅ๐ โงบ [๐ฅ] = ๐(๐๐๐๐๐ ๐ฅ๐ , ๐ฅ) ๐๐๐๐๐ = ๐; ๐๐๐๐๐ ๐ฅ โงบ ๐ฅ๐ = ๐(๐ฅ, ๐๐๐๐๐(๐ฅ๐ )) ๐๐๐๐๐ ๐0 , ๐1 , ๐2 , ๐3 , ๐ ๐๐๐๐๐ ๐0 , ๐1 , ๐2 , ๐3 ๐(๐(๐๐๐๐๐ [๐0 , ๐1 ] , ๐2 ), ๐3 ) ๐ ๐ ๐ ๐๐๐๐๐ ๐0 , ๐1 , ๐2 , ๐3 ๐ ๐ ๐ ๐ ๐๐๐๐๐ [ ] , ๐0 , ๐1 , ๐2 , ๐3 ๐ ๐ ๐ ๐ ๐, ๐0 , ๐1 , ๐2 , ๐3 ๐๐๐๐๐([๐0 , ๐1 , ๐2 , ๐3 ]) ๐(๐0 , ๐๐๐๐๐([๐1 , ๐2 , ๐3 ])) ๐(๐0 , ๐(๐1 , ๐๐๐๐๐([๐2 , ๐3 ]))) ๐(๐0 , ๐(๐1 , ๐(๐2 , ๐๐๐๐๐([๐3 ])))) ๐(๐0 , ๐(๐1 , ๐(๐2 , ๐(๐3 , ๐๐๐๐๐([]))))) ๐(๐0 , ๐(๐1 , ๐(๐2 , ๐(๐3 , ๐)))) Mathematical definition of right fold and left fold ๐๐๐๐๐ associates ๐ from the right ๐๐๐๐๐ associates ๐ from the left ๐ฅ = the Birst element ๐ฅs = all but the Birst element ๐ฅ = the last element ๐ฅ๐ = all but the last element