[5, 4, 3, 2, 1].map(n => Math.pow(n, n)).reduce((a, b) => a * b) === 1000 * 60 * 60 * 24
true
true
A sidereal day is not exactly 24 hours, it is closer to 23 hours 56 minutes and 4.1 seconds.
(At least that's how ISO8601 defines time periods: 11pm-12am is a one hour period even if leap seconds cause the last minute to have 59 or 61 seconds)
(*/ 1000 60 60 24) = */ ^~ 1 2 3 4 5
1 (24*60*60*1000)=*/x^x:!6
1
No stinking whitespace :-) (24*60*60*1000)=*/(!6)^!6
so does (24*60*60*1000)=1{x*y^y}/!6
but now you have two hideous parameters! (24*60*60*1000)=prd xexp[x;x]til 6
1b
Slightly more readable :P product (map (\n -> n ^ n) [1..5]) == 1000 * 60 * 60 * 24
=> True product $ map (\x -> x^x) [1..5]
(.) :: (b -> c) -> (a -> b) -> a -> c
($) :: (a -> b) -> a -> b
=> f (g (h x)) == f . g . h $ 5Nice one.
> 12345678910111210 + 1 == 12345678910111211
true
> 12345678910111210 + 1 == 12345678910111212
true > 19774**3 + 257049**3 == 257088**3
true> two true statements
What?
> n=12345678910111210
> n+1 === n+2
true> [0, 1, 2, 3, 4, 5].map(Math.pow).reduce((a, b) => a * b) === 1000 * 60 * 60 * 24
true
a=1;for(i=1;i<=5;i++)a*=Math.pow(i,i);a === 1000 * 60 * 60 * 24
a=1;i=1;while(i++<5)a*=Math.pow(i,i);a === 1000 * 60 * 60 * 24 5**5*4**4*3**3*2**2*1**1===24*60*60*1000
true 864e5 === 24 * 60 * 60 * 1000 864e5;(1..5).map{|n| n n}.reduce(:) == 24 60 * 60 * 1000
(1..5).map{|n| n**n}.reduce(:*) == 24 * 60 * 60 * 1000
Or if we're golfing (1..5).reduce{|t,n|t*n**n}