Skip to content

JoaoVitorLeite/ImmutableStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Immutable Stack

Description

Class to represent a Stack in Scala. Stack is a data structure type that respects dynamics: first in will be last out, or LIFO(last-in, first-out), as in the image below.

About

This class was implemented using a generic type, which was implemented here, which supports some basic algebraic operations and is defined for types Int, Float, Double, Long. The tests made are of simple character, and for this the Scala Test was used. In total 5 tests were performed.

Project Structure

src
|
+---.gitignore
|   0_pIpMT7n7lVCZcVFt.jpg
|   build.sbt
|   LICENSE
|   README.md   
|                               
+---src
|   +---main
|   |   \---scala
|   |       \---stack
|   |               Num.scala
|   |               Stack.scala
|   |               
|   \---test
|       \---scala
|           \---stack
|
|

Test

To perform the tests it is necessary to be in the root directory(where the build.sbt file is), then use the sbt test command. The tests used FunSuite and assert's.

IDE

The IDE used was Intellij Idea.

References

License

The LICENSE used is Apache-2.0.

About

Class to represent a Stack in Scala

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages