Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class
- APPLICATION
- create
- make
- feature
- make
- do
- across get_smth (100) as ic loop print (ic.item.out + " ") end
- end
- get_smth (maxn: INTEGER): LINKED_LIST [INTEGER]
- require
- valid: maxn >= 2
- local
- l_tab: ARRAY [BOOLEAN]
- do
- create Result.make
- create l_tab.make_filled (True, 2, maxn)
- across
- l_tab as ic
- loop
- if ic.item then
- Result.extend (ic.target_index)
- across ((ic.target_index * ic.target_index) |..| l_tab.upper).new_cursor.with_step (ic.target_index) as id
- loop
- l_tab [id.item] := False
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement