This quick tip will show you have to get REPL (Read-Eval-Print-Loop) using iOS8 Swift and Terminal.
If you read the What's new in XCode 6 it introduces some new features about Xcode 6, and it says:
Xcode’s debugger includes an interactive version of the Swift language, known as the REPL (Read-Eval-Print-Loop). Use Swift syntax to evaluate and interact with your running app or write new code in a script-like environment. The REPL is available from within LLDB in Xcode’s console, or from Terminal.
The first thing you need to do is:
sudo xcode-select -switch /Applications/Xcode6-Beta.app/Contents/Developer
Then you can use any of these two
xcrun swift lldb --repl