Yes, you can define your own syntax.
write a .pmap file:
[FOR_LOOP]
count {var:name} from {start:expr} until {end:expr}
now that's valid code. your rules, your language.
میشه یه تابع بنویسی که یه تابع از ورودی بگیره و اونو n بار اجرا کنه مثلا
for_loop(Start, End, Func) when Start =< End ->
Func(Start),
for_loop(Start 1, End, Func);
for_loop(_, _, _) ->
ok.
My assignment is now 100% complete!
✅ Finding average score by using #Array for saving score numbers and #for_loop for getting each number for calculating the average of score numbers
✅ Used control Structur of #if to find how got highest score
@CodeToInspire@E_Ehrari#js
I have been practicing Loops today with C programing language . A semicolon put in a wrong place gave me a very hard time in one of the For_loop code but finally I found the bug. #100DaysOfCode
# for loop function without using any loop (recursive solution)
def for_loop(start = 0, end = 10, increment = 1):
if end == start:
return start
for_loop(end = end - increment)
print(end)