You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionis_prime(num)
staticregex=new (require"regex") [[/^.?$|^(..+?)\1+$/]]returnnotregex:match("1":rep(num))
end
Could possibly generate code like this:
functionis_prime(num)
ifnot__staticinit__prime_check__regexdo__staticinit__prime_check__regex=new (require"regex") [[/^.?$|^(..+?)\1+$/]]endreturnnot__staticinit__prime_check__regex:match("1":rep(num))
end
The text was updated successfully, but these errors were encountered:
Example:
Could possibly generate code like this:
The text was updated successfully, but these errors were encountered: