Skip to content

Commit 094b40e

Browse files
committed
adds getindex for ideal generators
1 parent c831bba commit 094b40e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/types.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ end
4545
Base.parent(I::Ideal) = Nemo.parent(I.gens[1])
4646

4747
Base.show(io::IO, I::Ideal) = print(io, I.gens)
48+
49+
Base.getindex(I::Ideal, idx::Int) = I.gens[idx]

0 commit comments

Comments
 (0)