← Back to Categories

🎯 Intent-Based Programming Examples

Learn Mewar's unique Tell, Show, Explain and Goal features through practical examples.

1. TELL Example

set nums to [10, 20, 30]

say "Max of list:"
tell max of nums

say "Min of list:"
tell min of nums

say "Sum of list:"
tell sum of nums

say "Average of list:"
tell average of nums

say "Count of list:"
tell count of nums

2. SHOW Variable

set a to 10
set b to "Hello"
set nums to [1, 2, 3]

show
newline

show a
newline

show b
newline
show nums

3. SHOW List

set kings to ["Pratap","Sanga","Kumbha"]

show kings

4. EXPLAIN Variable

set score to 95

explain score

5. EXPLAIN Loop

set nums to [10, 20, 30]

for n in nums then
  explain loop
end 

6. EXPLAIN Condition

set age to 20
set rank to "Captain"

explain age > 18 and rank is "Captain" 

7. EXPLAIN Program

set a to 10
set b to 20

say (a + b)

explain program

8. GOAL Success

#1 profram
goal sum == 10
goal "Sum must be correct"

set a to 3
set b to 4
set sum to a + b

explain program
newline

#2 program
say "second program"
goal sum == 10
goal "Sum must be correct"

set a to 6
set b to 4
set sum to a + b

explain program

9. SHOW WITH MATRIX

matrix A = [[1,2],[3,4]]

say "Matrix A:"
show A